/*
 * Copyright (c) 2005, 2014 vacoor
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 */
package org.vacoor.nothing.wdb.domain;

/**
 */
public class DbColumn {
    final DbTable table;
    final int position;
    final String name;
    final String dataType;
    final boolean nullable;
    final Object defaultValue;
    final String remarks;

    DbColumn(DbTable table, int position, String name, String dataType, boolean nullable, Object defaultValue, String remarks) {
        this.table = table;
        this.position = position;
        this.name = name;
        this.dataType = dataType;
        this.nullable = nullable;
        this.defaultValue = defaultValue;
        this.remarks = remarks;
    }

    @Override
    public String toString() {
        return table.toString() + " - C#" + position + ", " + name + ", " + dataType + ", " + nullable + ", " + defaultValue + ", " + remarks;
    }

    public String getName() {
        return name;
    }

    public String getDataType() {
        return dataType;
    }

    public boolean isNullable() {
        return nullable;
    }

    public Object getDefaultValue() {
        return defaultValue;
    }

    public String getRemarks() {
        return remarks;
    }
}
